package com.vise.facedemo.alioss.fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.vise.facedemo.R;
import com.vise.facedemo.alioss.http.API;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;


/**
 * 分类
 */
public class Two_Fragment extends Fragment {
    View view;

    Unbinder unbinder;
    @BindView(R.id.tv_jingshentiaoyang)
    TextView tvJingshentiaoyang;
    @BindView(R.id.tv_yuletiaoshi)
    TextView tvYuletiaoshi;
    @BindView(R.id.tv_sijiyangsheng)
    TextView tvSijiyangsheng;
    @BindView(R.id.tv_tiyuduanlian)
    TextView tvTiyuduanlian;
    @BindView(R.id.tv_qijutiaoshe)
    TextView tvQijutiaoshe;
    @BindView(R.id.tv_yinyuetiaoli)
    TextView tvYinyuetiaoli;
    @BindView(R.id.tv_jingluobaojian)
    TextView tvJingluobaojian;



    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        if (view == null) {
            view = View.inflate(getActivity(), R.layout.f2, null);

            ButterKnife.bind(this, view);
initview();
        }
        ViewGroup parent = (ViewGroup) view.getParent();
        if (parent != null) {
            parent.removeView(view);
        }

        unbinder = ButterKnife.bind(this, view);
        return view;
    }

    private void initview() {
        String jingshentiaoyang = API.tiaoli.getJingshentiaoyang();
        String yuletiaoshe = API.tiaoli.getYuletiaoshe();
        String sijiyangsheng = API.tiaoli.getSijiyangsheng();
        String tiyuduanlian = API.tiaoli.getTiyuduanlian();
        String qijutiaoshe = API.tiaoli.getQijutiaoshe();
        String yinyuetiaoli = API.tiaoli.getYinyuetiaoli();
        String jingluobaojian = API.tiaoli.getJingluobaojian();
        tvJingshentiaoyang.setText(jingshentiaoyang);
        tvYuletiaoshi.setText(yuletiaoshe);
        tvSijiyangsheng.setText(sijiyangsheng);
        tvTiyuduanlian.setText(tiyuduanlian);
        tvQijutiaoshe.setText(qijutiaoshe);
        tvYinyuetiaoli.setText(yinyuetiaoli);
        tvJingluobaojian.setText(jingluobaojian);
    }


    @Override
    public void onDestroyView() {
        super.onDestroyView();

    }
}
